package com.gen.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gen.dao.IDepartDao;
import com.gen.entity.Depart;

@Service
public class DepartServiceImpl implements IDepartService {
	@Autowired
	private IDepartDao departDao;

	public IDepartDao getDepartDao() {
		return departDao;
	}

	public void setDepartDao(IDepartDao departDao) {
		this.departDao = departDao;
	}

	@Override
	public int insertDepart(Depart depart) {
		return departDao.insertDepart(depart);
	}

	@Override
	public int deleteDepart(Integer departid) {
		return departDao.deleteDepart(departid);
	}

	@Override
	public int updateDepart(Depart depart) {
		return departDao.updateDepart(depart);
	}

	@Override
	public List<Depart> selectAllDepart() {
		return departDao.selectAllDepart();
	}

	@Override
	public Depart selectDepartById(Integer departid) {
		return departDao.selectDepartById(departid);
	}

	@Override
	public List<Depart> selectDepartByParam(Depart depart) {
		return departDao.selectDepartByParam(depart);
	}

}
